package com.tanhua.dubbo.pojo;

import cn.hutool.core.annotation.Alias;
import lombok.*;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.index.IndexDirection;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

@Document(collection = "tanhua_sound")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Sound implements java.io.Serializable {

    private ObjectId id;   //主键
    private Long userId;   // 发布音频用用户id
    private Long sid;     // 音频号
    @Alias("soundUrl")
    private String url;   // 音频url
    @Indexed(direction = IndexDirection.DESCENDING)
    private Long created; // 发布时间
}
